package com.zhiyou100.service;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou100.dao.StarDao;
import com.zhiyou100.model.Star;

@Service
public class StarServiceImpl implements StarService{

	@Autowired
	private StarDao starDao;
	
	@Override
	public void add(Star star) {

		starDao.add(star);
	}

	@Override
	public void delete(int id) {

		starDao.delete(id);
		
	}

	@Override
	public ArrayList<Star> list(int userId) {

		ArrayList<Star> find = starDao.findAll(userId);
		
		return find;
	}

}
